<?php 
 
/**
 * @package	Joomla.Tutorials
 * @subpackage	Module
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
 * @license	License GNU General Public License version 2 or later; see LICENSE.txt
 */
 
// No direct access to this file
defined('_JEXEC') or die;
?>
 
<style>
.xs-dientoan{border: 2px solid #CCC; margin-bottom: 5px; text-align: center;}
.xs-dientoan p{text-transform:uppercase; padding: 3px; text-align: center;}
.xs-dientoan table{width: 100%; border-top: 2px solid #CCC;}
.xs-dientoan table td{border-left: 2px solid #CCC; text-align: center; padding:10px 5px;}
.xs-dientoan table td.first{border: none;}
.fleft{float: left;}
.fright{float: right;}
.center{text-align: center;}
</style>
<div style="float: left; width: 100%;">
<?php 
//$result	= modXosoDientoanHelper::getResult();
//print_r($result);
$result = modXosoDientoanHelper::getResult();

?>
<div class="xs-dientoan fleft" style="width: 99%;">
	<p class="center">Xổ số điện toán 6x36 Ngày <?php echo(date('d/m/Y',strtotime($result[0]->date)));?></p>
	<table>
		<tr>
			<?php foreach(json_decode($result[0]->data) as $k => $col):?>
			<td<?php echo($k==0 ? ' class="first"' : '')?>><?php echo $col;?></td>
			<?php endforeach;?>
		</tr>
	</table>
</div>

<div style="width: 100%; float: left;">
<div class="xs-dientoan fleft" style="margin-right: 5px; width: 53%;">
	<p class="center">Xổ số điện toán 123-<?php echo(date('d/m/y',strtotime($result[0]->date)));?></p>
	<table>
		<tr>
			<?php foreach(json_decode($result[1]->data) as $k => $col):?>
			<td<?php echo($k==0 ? ' class="first"' : '')?>><?php echo $col;?></td>
			<?php endforeach;?>
		</tr>
	</table>
</div>

<div class="xs-dientoan fright" style="width: 44%;">
	<p class="center">Xổ số thần tài-<?php echo(date('d/m/y',strtotime($result[0]->date)));?></p>
	<table>
		<tr>
			<?php foreach(json_decode($result[2]->data) as $k => $col):?>
			<td<?php echo($k==0 ? ' class="first"' : '')?>><?php echo $col;?></td>
			<?php endforeach;?>
		</tr>
	</table>
</div>
</div>
</div>